package com.qf.smartplatform.mapper;

import com.qf.smartplatform.pojo.SysScene;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface SysSceneMapper {
    @Insert("insert into sys_scene (scene_name,create_by,create_time,status) values (#{sceneName},#{createBy},#{createTime},#{status})")
    int addScene(SysScene sysScene);
    @Delete("delete from sys_scene where scene_id = #{sceneId}")
    int deleteSceneById(String sceneId);
    @Update("update sys_scene set scene_name=#{sceneName},status=#{status} where scene_id=#{sceneId}")
    int updateScene(SysScene sysScene);

    int defaultScene();

    @Select("select * from sys_scene where scene_id=#{sceneId}")
    SysScene findById(Long sceneId);
    @Select("select * from sys_scene where create_by=#{userId}")
    List<SysScene> findAllByUSer(Long userId);
}
